home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-08-19 | 6.0 KB | 214 lines |
-
- # We would like you to use Bison instead of Yacc since some
- # versions of Yacc cannot handle reentrant parsing. Unfortunately,
- # this includes the Yacc currently being shipped with SunOS4.x.
- # If you do use Yacc, please make sure that any bugs in parsing
- # are not really manifestations of Yacc bugs before you report
- # them.
-
- # Here is a rule for making .o files from .c files that does not
- # force the type of the machine (like -"sparc") into the flags.
- .c.o:
- $(RM) $@
- $(CC) -c -o $*.o $(CFLAGS) $(CPPFLAGS) $*.c
-
-
-
- BISON = bison -y
- CC = cgcc
-
- SHELL=bash
-
- MACHINE = "atari"
- OS = TOS
-
- PROFILE_FLAGS=
-
- # This system has the setlinebuf () call.
- # LINEBUF = -DHAVE_SETLINEBUF
-
- # This system has the vprintf () and vfprintf calls.
- VPRINTF = -DHAVE_VPRINTF
-
- # This system has <unistd.h>.
- UNISTD = -DHAVE_UNISTD_H
-
- # This system has multiple groups.
- # GROUPS = -DHAVE_MULTIPLE_GROUPS
-
- # This system has <sys/resource.h>
- RESOURCE = -DHAVE_RESOURCE
-
- # This system's signal () call returns a pointer to a function returning
- # void. The signal handlers themselves are thus void functions.
- SIGHANDLER = -DVOID_SIGHANDLER
-
- # This system has <sys/wait.h>
- # WAITH = -DHAVE_WAIT_H
-
- # This system has the getwd () call.
- # GETWD = -DHAVE_GETWD
-
- # This system has a working version of dup2 ().
- DUP2 = -DHAVE_DUP2
-
- SYSTEM_FLAGS = $(LINEBUF) $(VPRINTF) $(UNISTD) $(GROUPS) $(RESOURCE) \
- $(SIGHANDLER) $(SYSDEP) $(WAITH) $(GETWD) $(DUP2) \
- -D$(MACHINE) -D$(OS)
-
- DEBUG_FLAGS = $(PROFILE_FLAGS) # -g
- LDFLAGS = $(SYSDEP_LD) $(DEBUG_FLAGS) -s
-
- CFLAGS = $(DEBUG_FLAGS) $(SYSTEM_FLAGS) -DSHELL $(ALLOCA_CFLAGS) \
- -O -fstrength-reduce
-
- CPPFLAGS = -I$(LIBSRC)
-
- # These are required for sending bug reports.
- SYSTEM_NAME = $(MACHINE)
- OS_NAME = $(OS)
-
- # The name of this program.
- PROGRAM = bash.ttp
-
- # The type of machine Bash is being compiled on.
- HOSTTYPE_DECL = -DHOSTTYPE='$(SYSTEM_NAME)'
-
- bash_maintainer = scott@sparc1.stevens-tech.edu
- MAINTAIN_DEFINE = -DMAINTAINER='"$(bash_maintainer)"'
-
- # The group of configuration flags. These are for shell.c
- CFG_FLAGS = -DOS_NAME='"$(OS_NAME)"' -DSYSTEM_NAME='$(SYSTEM_NAME)' \
- $(SIGLIST_FLAG) $(MAINTAIN_DEFINE)
-
- # The directory which contains the source for malloc. The name must
- # end in a slash, as in "../alloc-files/".
- ALLOC_DIR = ../alloc-files/
-
- # Our malloc.
- ALLOCA_H_DEFINE = -DHAVE_ALLOCA_H
- ALLOCA_DEFINE = -DHAVE_ALLOCA
- ALLOCA_CFLAGS = $(ALLOCA_DEFINE) $(ALLOCA_H_DEFINE)
- ALLOC_HEADERS = $(ALLOC_DIR)getpagesize.h
- ALLOC_FILES = $(ALLOC_DIR)malloc.c $(ALLOC_DIR)alloca.c
-
- RM = rm -f
-
- # Support libraries required. Termcap and Readline.
- # The location of sources for the support libraries.
- LIBSRC = ../
- RLIBSRC = ../readline/
-
- # You wish to compile with the line editing features installed.
- READLINE_LIB = -lreadline
- TERMCAP_LIB = -ltermcap
-
- # The source and object of the bash->readline interface code.
- RL_SUPPORT_SRC = bashline.c
- RL_SUPPORT_OBJ = bashline.o
-
- # The order is important. Most dependent first.
- LIBRARIES = $(READLINE_LIB) $(TERMCAP_LIB) $(LOCAL_LIBS) -liio
-
- LIB_P = ../lib+/lib-plus.c
- LIB_P_OBJ = ../lib+/lib-plus.o
-
-
- CSOURCES = shell.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \
- dispose_cmd.c execute_cmd.c variables.c builtins.c\
- fc.c expr.c copy_cmd.c flags.c subst.c glob.c hash.c mailcheck.c\
- test.c trap.c jobs.c nojobs.c $(ALLOC_FILES) braces.c\
- unwind_prot.c siglist.c ulimit.c version.c $(RL_SUPPORT_SRC)\
- $(LIB_P)
-
-
- HSOURCES = shell.h flags.h trap.h hash.h jobs.h builtins.h alias.c y.tab.h \
- alias.h general.h variables.h config.h $(ALLOC_HEADERS) \
- quit.h ndir.h machines.h posixstat.h
-
- SOURCES = $(CSOURCES) $(HSOURCES)
-
- OBJECTS = shell.o y.tab.o general.o make_cmd.o print_cmd.o\
- dispose_cmd.o execute_cmd.o variables.o builtins.o copy_cmd.o\
- fc.o expr.o flags.o jobs.o subst.o glob.o hash.o mailcheck.o test.o\
- trap.o alias.o $(MALLOC) $(ALLOCA) braces.o unwind_prot.o\
- $(SIGLIST) ulimit.o version.o $(RL_SUPPORT_OBJ) $(LIB_P_OBJ)
-
- all: $(PROGRAM)
-
- $(PROGRAM): .build $(OBJECTS)
- rm -f $@
- $(CC) $(LDFLAGS) $(READLINE_LDFLAGS) -o $(PROGRAM) $(OBJECTS) \
- $(LIBRARIES)
-
- .build: $(SOURCES)
- @echo
- @echo " ***************************************************"
- @echo " * *"
- @echo " * Making Bash for a $(MACHINE) running $(OS)."
- @echo " * *"
- @echo " ***************************************************"
- @echo
- @echo "$(PROGRAM) last made for a $(MACHINE) running $(OS)" >.machine
-
- shell.h: general.h variables.h config.h quit.h
- touch shell.h
-
- jobs.h: endian.h quit.h
- touch jobs.h
-
- variables.h: hash.h
- touch variables.h
-
- builtins.h: alias.h
- touch builtins.h
-
- y.tab.c: parse.y shell.h
- $(BISON) -d parse.y
-
- version.o: version.h
-
- shell.o: shell.h flags.h shell.c posixstat.h
- $(CC) $(CFG_FLAGS) $(CFLAGS) $(CPPFLAGS) -c shell.c
-
- ulimit.o: shell.h ulimit.c pipesize.h
- $(CC) $(CFLAGS) -c ulimit.c
-
- variables.o: shell.h hash.h flags.h
- $(CC) -c $(CFLAGS) $(HOSTTYPE_DECL) variables.c
-
- braces.o: general.h
- builtins.o: shell.h hash.h jobs.h builtins.h trap.h flags.h
- copy_cmd.o: shell.h hash.h
- dispose_cmd.o: shell.h
- execute_cmd.o: shell.h y.tab.h posixstat.h builtins.h flags.h jobs.h
- expr.o: shell.h hash.h
- fc.o: shell.h hash.h builtins.h
- flags.o: flags.h config.h general.h quit.h
- general.o: shell.h
- glob.o: config.h
- hash.o: shell.h hash.h
- jobs.o: shell.h hash.h trap.h jobs.h
- mailcheck.o: posixstat.h variables.h hash.h quit.h
- make_cmd.o: shell.h flags.h
- parse.o: shell.h flags.h
- print_cmd.o: shell.h y.tab.h
- shell.o: shell.h flags.h
- subst.o: shell.h flags.h alias.h jobs.h
- test.o: posixstat.h
- trap.o: trap.h shell.h hash.h
- ulimit.o: variables.h quit.h pipesize.h
- unwind_prot.o: config.h general.h
-
- bashline.o: shell.h hash.h builtins.h
-
- bashline.o: $(RLIBSRC)chardefs.h $(RLIBSRC)history.h $(RLIBSRC)readline.h
- bashline.o: $(RLIBSRC)keymaps.h $(RLIBSRC)history.h
- fc.o: $(RLIBSRC)history.h
- parse.o: $(RLIBSRC)keymaps.h $(RLIBSRC)chardefs.h $(RLIBSRC)history.h
- parse.o: $(RLIBSRC)readline.h
- subst.o: $(RLIBSRC)history.h
-
- clean:
- $(RM) $(OBJECTS) $(PROGRAM)
-